package pojo;

public class CommodityList {
    private static final int Commodity_NUM=10;
    private Commodity[] commodities=new Commodity[Commodity_NUM];
    public CommodityList() {
        commodities[0]= new Commodity(1, "薯片", "2023.02.20", "6个月", "乐事",9);
        commodities[1]= new Commodity(2, "椰子汁", "2023.02.23", "6个月", "欢乐家",6);
        this.commdityCount=2;

    }


    public Commodity getCommodities(int i) {
        return commodities[i];
    }

    public void setCommodities( Commodity commodities) {
        this.commodities [commdityCount]= commodities;
    }
    public void setCommodities( int i,Commodity commodities) {
        this.commodities [commdityCount]= commodities;
    }


    private int commdityCount;

    public int getCommdityCount() {
        return commdityCount;
    }

    public void setCommdityCount(int commdityCount) {
        this.commdityCount = commdityCount;
    }

    private int commditiesNum;

    public int getCommditiesNum() {
        return commditiesNum;
    }

    public void setCommditiesNum(int i) {
        this.commditiesNum = commditiesNum;
    }
}
